<?php
/**
 * Func   后台首页
 */
defined('IN_YuLin') || exit('NO PERMIT!');
include_once (ROOT_PATH.'lib/api_common/lottery.inc.php');
$res = array(
    'status' => 'success',
    'msg'    => '',
);
$post = json_decode($_POST['data']);
switch ($post->operation){
    case 'setOrd':
        $ordData = $post->ordData;
        $res     = setOrd($ordData);
    case 'setCreditOpen':
        $setData = $post->setData;
        $res     = setCreditLottOpen($setData);
        break;
    case 'getSetCreditInfo':
        $lott_id = $post->lott_id;
        $res     = getSetCreditInfo($lott_id);
        break;
    case 'getRePointOddsByCateid':
        // 获取
        $data    = getRepointOddsList($post->cateid, $post->re_point);
        $res     = $data;
        break;
    case 'setRepointOdds':
        $res     = setRepointOdds($post->id, $post->value);
        break;
}
echo json_encode($res);

